﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpGen.Common.Enums;

namespace SharpGen.Common
{
    public class SqlRelation
    {
        private string _refEntity;
        public string RefEntity
        {
            get { return _refEntity; }
        }

        private SqlRelationType _relationType;
        public SqlRelationType RelationType
        {
            get { return _relationType; }
        }

        private string _sourceColumn;
        public string SourceColumn
        {
            get { return _sourceColumn; }
            set { _sourceColumn = value; }
        }

        private string _destinationColumn;
        public string DestinationColumn
        {
            get { return _destinationColumn; }
            set { _destinationColumn = value; }
        }

        private Dictionary<string, string> _columns = new Dictionary<string, string>();
        public Dictionary<string, string> Columns
        {
            get { return _columns; }
        }

        private string _propertyName;
        public string PropertyName
        {
            get { return _propertyName; }
            set { _propertyName = value; }
        }

        public SqlRelation(string refEntity, SqlRelationType relationType)
        {
            _refEntity = refEntity;
            _relationType = relationType;
            //_propertyName = _refEntity;
        }
    }
}
